﻿@{
    Layout = "../_layout.cshtml";
    Page.Title = "图书分类";
    Page.Description = V5.Config.View["SiteDescription"];
    Page.Keywords = V5.Config.View["SiteKeywords"];
}
@{
    var ClassId = InputHelper.SetNumber(Request["ClassId"]);
    DataRow drClass = V5.Book.Get_By_List(ClassId.ToString());
    if (drClass == null) {
        Response.Write("错误的参数!");
        Response.End();
    }
}
<div id="content">
    <div class="crumbs">
        <span>您现在的位置：</span><a href="@V5.Config.SiteUrl">@V5.Config.View["SiteTitle"]</a><span>@drClass["ClassTitle"]</span>
    </div>
    <div class="layout grid-s5m0">
        <div class="col-main">
            <div class="main-wrap">
                <div id="slide1" class="tuijian">
                    <div class="bar">
                    </div>
                    <a class="prev" hidefocus="true" href="javascript:void(0);" title="上一页"></a><a class="next"
                        hidefocus="true" href="javascript:void(0);" title="下一页"></a>
                    <div class="scroller">
                        <ol class="ks-switchable-content book-ul" style="position: absolute; width: 1980px;
                            left: -1320px;">
                            @foreach (DataRow dr in V5.Book.Query_By("*", "", "", 10).Rows) {
                                <li class="selected" style="display: block; float: left;">
                                    <div class="tbook-img img100">
                                        <a id="ctl00_c1_rbooks_ctl08_cover" title="@dr["BookName"]" href="@dr["Url"]"
                                                    target="_blank">
                                            <img title="@dr["BookName"]" src="@dr["WeiZhi"]" style="border-width: 0px;" width="90" height="90"></a></div>
                                    <div class="tbook-info">
                                        <div class="tbook-name">
                                            <a id="ctl00_c1_rbooks_ctl08_bookname" title="@dr["BookName"]" href="@dr["Url"]"
                                                        target="_blank">@dr["BookName"]</a></div>
                                        <div class="tbook-author">
                                            @dr["Author"]</div>
                                        <div class="price">
                                            <p>
                                                <span class="old-price">@dr["Price"]</span><span class="new-price">@dr["SellPrice"]</span></p>
                                        </div>
                                    </div>
                                </li>
                            }
                        </ol>
                    </div>
                    <ul class="ks-switchable-nav">
                        <li class="">1</li><li class="">2</li><li class="ks-active">3</li></ul>
                </div>
                <div class="msg">
                    <div class="msg-default msg-tips">
                        <i class="msg-icon"></i>
                        <h4 class="msg-title">
                            提示：
                        </h4>
                        <div class="msg-content">
                            选择[只显示特价]，可在本类图书中淘出特价书！特价书库存变化很快，赶快下手，买到即是赚到！ <a href="#help/64.html" target="_blank">
                                【什么是特价书？】</a>
                        </div>
                    </div>
                </div>
                <div class="rank">
                    <div class="rank_l" id="url" order="0" cid="1001">
                        <input name="ctl00$c1$filtertj" type="checkbox" id="ctl00_c1_filtertj" onclick="Filter();"><label
                            for="ctl00_c1_filtertj" title="只显示特价">只显示特价</label><input name="ctl00$c1$filteryh"
                                type="checkbox" id="ctl00_c1_filteryh" onclick="Filter();"><label for="ctl00_c1_filteryh"
                                    title="只显示有货">只显示有货</label></div>
                    <div class="rank_r">
                        <a class="sort"></a><a href="#list/1001_0_0_0.html" class="correlation-current" title="按上架时间从近到远排序">
                        </a><a href="#list/1001_0_0_1.html" class="sales" title="按销量从高到低排序"></a><a href="#list/1001_0_0_2.html"
                            class="prices" title="按价格从低到高排序"></a><a href="#list/1001_0_0_3.html" class="discount"
                                title="按折扣从高到低排序"></a><a href="#list/1001_0_0_4.html" class="times" title="按出版时间从近到远排序">
                                </a>
                    </div>
                </div>
                <div id="book-list">
                    @{
                        var pageIndex = InputHelper.SetNumber(Request["pageid"]);
                        var UrlList = V5.Url.Action("book/list", new { clasid = 0, pageid = "@pageid", search = "" });
                        foreach (DataRow dr in V5.Book.Query_By_Pager("*", "", "", 25, pageIndex, UrlList).Rows) {
                        <div class="single-bar">
                            <ul>
                                <li class="s-book-img img130"><a href="@dr["Url"]" target="_blank">
                                    <img alt="@dr["BookName"]" src="@dr["WeiZhi"]" width="120" height="120"></a><span
                                        class="tj-span"></span></li>
                                <li class="s-book-info">
                                    <div class="s-book-name">
                                        <a id="ctl00_c1_lbooks_ctl02_bookname" href="@dr["Url"]">@dr["BookName"]</a></div>
                                    <div class="authors">
                                        / <a href="@V5.Html.Out(V5.Url.Action("book/search", new { classid = 0, pageid = 1, search = "pub!" + dr["PubId"] }))"
                                                    title="点击查看更多该出版社图书" target="_blank">@dr["PubId"]</a> / 2011-01-01</div>
                                    <div class="summary">@dr["Note"]</div>
                                </li>
                                <li class="legend">
                                    <div class="price">
                                        <span class="new-price">@dr["Price"]</span></div>
                                    <div class="price">
                                        <span class="old-price">@dr["SellPrice"]</span></div>
                                    <div class="price">
                                        <span class="discount">26折</span></div>
                                    <a href="javascript:void(0)" pid="1611254" class="btn-sbuy"></a><a href="javascript:void(0)"
                                        pid="1611254" class="btn-sadd"></a></li>
                            </ul>
                        </div>
                        }
                    }
                    <div class="pages">
                        @V5.Html.Out(V5.Book.Pager)
                    </div>
                </div>
            </div>
        </div>
        <div class="col-sub">
            <div id="sub-catalog">
                <dl>
                    @{
                        var requetClassId = Request["ClassId"];
                        DataRow drClass1 = V5.Book.Get_By_List(requetClassId);
                        if (drClass1 != null) {
                            if (drClass1["ClassCode"].ToString().Length == 8) {
                                drClass1 = V5.Book.Get_By_List(drClass1["ParentId"].ToString());
                            }
                        <dt>@drClass1["ClassTitle"]<s></s></dt>
                            if (drClass1["ClassCode"].ToString().Length == 4) {
                                foreach (DataRow dr in V5.Book.Query_By_List("*", "ParentId=" + drClass1["ClassId"], "", 0).Rows) {
                                    var cc = "";
                                    if (requetClassId == dr["ClassId"].ToString()) {
                                        cc = "h";
                                    }
                        <dd>
                            <a href="@dr["Url"]" title="@(dr["ClassTitle"])(@dr["RecordCount"])" class="@cc">@(dr["ClassTitle"])(@dr["RecordCount"])</a></dd>
                                }
                            }
                        }
                    }
                </dl>
            </div>
            <div class="left-book">
                <div class="left-title">
                    同类图书热卖榜</div>
                <ul class="book-ul" id="j_books">
                    @{
                        var loopNum = 1;
                        foreach (DataRow dr in V5.Book.Query_By("*", "", "", 10).Rows) {
                            var ccHtml = "";
                            var firstHtml = "";
                            if (loopNum == 1) {
                                firstHtml = "selected";
                            }
                            if (loopNum < 5) {
                                ccHtml = "hot-3";
                            }
                        <li class="@ccHtml @firstHtml"><strong>@(loopNum)</strong><a id="hbooks_ctl00_cover" title="@dr["BookName"]"
                                class="tbook-img img60" href="@V5.Html.Out(dr["Url"])" target="_blank"><img
                                    title="@dr["BookName"]" src="@dr["weizhi"]" style="border-width: 0px;" width="60" height="60" /></a>
                            <div class="tbook-info">
                                <div class="tbook-name">
                                    <a id="hbooks_ctl00_bookname" title="@dr["BookName"]" href="@V5.Html.Out(dr["Url"])"
                                            target="_blank">@dr["BookName"]</a></div>
                                <p class="tbook-price">
                                    <span class="price_d">¥<em>@(dr["SellPrice"])</em></span><span class="discount">26折</span></p>
                            </div>
                        </li>
                            loopNum++;
                        }
                    }
                </ul>
            </div>
        </div>
    </div>
</div>
@section meta{
    <link rel="stylesheet" type="text/css" href="/@(V5.Config.TemplatePath)/style/book-list.css" />
}
@section header{
    @RenderPage("../inc/_header-channel-nav.cshtml")
}
@section footer{
    @RenderPage("../inc/_footer-friendlinks.cshtml")
}
@section bottom{
    <script type="text/javascript" src="/@(V5.Config.TemplatePath)/Images/ts-common.js"></script>
    <script type="text/javascript" src="/@(V5.Config.TemplatePath)/scripts/ts-index.js"></script>
}
